import axios from "./index.js";
import { appkey } from "@/assets/js/config.js";

const BASE = "https://a1.easemob.com";

let org_name = appkey.split("#")[0];
let app_name = appkey.split("#")[1];

let register_url = `${BASE}/${org_name}/${app_name}/users`;
let login_url = `${BASE}/${org_name}/${app_name}/token`;

export const req_register = (params) => axios.post(register_url, params);
export const req_login = (params) => axios.post(login_url, params);
